package com.gzz.orchid.main.facade.controller;

import org.springframework.messaging.rsocket.service.RSocketExchange;
import org.springframework.stereotype.Controller;
import reactor.core.publisher.Flux;

import java.time.Duration;

@Controller
public class NotificationController {


    @RSocketExchange("nnotifications")
    public Flux<String> streamNotifications() {
        return Flux.interval(Duration.ofSeconds(1))
                .map(seq -> "Notification #" + seq);
    }
}

